package com.k2data.k2app.mapper;

import com.k2data.k2app.domain.DeviceCond;
import com.k2data.k2app.domain.po.MonitorPoint;
import com.k2data.k2app.domain.po.TMonitorPoint;
import com.k2data.k2app.mybatis.mapper.K2Mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lidong9144@163.com 17-4-5.
 */
@Mapper
@Repository
public interface MonitorPointMapper extends K2Mapper<MonitorPoint> {

    Long insertBackId(MonitorPoint monitorPoint);

    List<MonitorPoint> selectPoints(DeviceCond cond);
    List<MonitorPoint> selectPointsCopy(DeviceCond cond);
    /**
     * 查询设备的通道
     *
     * v0.1
     * @param deviceId
     * @return
     */
    List<MonitorPoint> selectChannelId(@Param("deviceId") Long deviceId);

    /**
     * 查询设备的通道
     *
     * v0.2
     * @param deviceId
     * @return
     */
    List<MonitorPoint> selectChannelIdByDevice(@Param("deviceId") Long deviceId);

    /**
     * 查询设备的测点变量
     * @param cond
     * @return
     */
    List<MonitorPoint> selectDeviceVariable(DeviceCond cond);

}
